package learning.homework2;


import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.Socket;

public class User {
	public static void main(String[] args) {
		try {
			Socket s=new Socket("127.0.0.1", 2222);
			BufferedWriter os=new BufferedWriter(new OutputStreamWriter(s.getOutputStream()));
			BufferedReader is=new BufferedReader(new InputStreamReader(s.getInputStream()));
			String srData="12,13,14";
			System.out.println(srData);
			os.write(srData);
			os.newLine();
			os.flush();
			int b=0;
			String str=is.readLine().trim();
			System.out.println("Area="+str);
			os.close();
			is.close();
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} 
	}

}
